<template>
  <div class='grand-child-view'>
    <p>孙子组件</p>{{isShow}}
    <p>传给孙子组件的数据：{{row.name}} {{row.name !== undefined? '学习' : ''}} {{row.platform}}</p>
  </div>
  <button @click="startUpFoo">我要更新foo</button>
</template>
<script lang="ts">
import { reactive } from 'vue'
export default {
  inheritAttrs: false,
  props: {
    isShow: {
      type: Boolean,
      dedault: false
    },
    row: {
      type: Object,
      dedault: () => reactive({})
    }
  },
  setup (props: any, ctx: { emit: (arg0: string, arg1: string) => void }) {
    const startUpFoo = () => {
      ctx.emit('upFoo', 'foooooooooooo')
    }
    return {
      startUpFoo
    }
  }
}
</script>
